Tile = class('Tile'):include(Stateful)

function Tile:initialize(x, y, z, typ)
	self.x = x
	self.y = y
	self.z = z
        self.type = typ
        if self.type == game.wall_type then
            self.img = image.wall_tile
        elseif self.type == game.floor_type then
            self.img = image.floor_tile
        end
end

function Tile:draw(offset_x, offset_y)
    if self.type == game.wall_type or self.type == game.floor_type then
        love.graphics.draw(self.img, offset_x+self.x*game.tile_width, offset_y+self.y*game.tile_height,
                           0, .25, .25)
    end
end